package com.vcc.data.entity;


import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Table;
import com.vcc.data.base.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 卡种
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Setter
@Getter
@Table(value = "vcc_user_card_wallet")
public class UserCardWallet extends BaseEntity implements Serializable {

    @Column(comment = "卡ID", value = "card_id")
    private Long cardId;

    @Column(comment = "用户ID", value = "user_id")
    private Long userId;

    @Column(comment = "金额", value = "amount")
    private BigDecimal amount;

    @Column(comment = "汇率", value = "exchange_rate")
    private BigDecimal exchangeRate;

    @Column(comment = "是否支持开卡", value = "verify_open_card_status")
    private Integer verifyOpenCardStatus;

    @Column(comment = "是否支持充值", value = "verify_recharge_card_status")
    private Integer verifyRechargeCardStatus;

    @Column(comment = "是否支持出卡", value = "verify_out_card_status")
    private Integer verifyOutCardStatus;

    @Column(comment = "是否支持关卡", value = "verify_close_card_status")
    private Integer verifyCloseCardStatus;

    @Column(comment = "是否支持冻结解冻", value = "verify_freeze_un_freeze_card_status")
    private Integer verifyFreezeUnFreezeCardStatus;

    @Column(comment = "线上开卡次数", value = "open_card_on_line_count")
    private Integer openCardOnLineCount;

    @Column(comment = "授权手续费基数", value = "auth_fee")
    private BigDecimal authFee;

    @Column(comment = "授权手续费比例", value = "auth_fee_rate")
    private BigDecimal authFeeRate;

    @Column(comment = "小金额授权手续费", value = "min_auth_fee")
    private BigDecimal minAuthFee;

    @Column(comment = "小金额授权手续费比例", value = "min_auth_fee_rate")
    private BigDecimal minAuthFeeRate;

    @Column(comment = "失败手续费", value = "fail_fee")
    private BigDecimal failFee;

    @Column(comment = "失败手续费比例", value = "fail_fee_rate")
    private BigDecimal failFeeRate;

    @Column(comment = "退款手续费", value = "refund_fee")
    private BigDecimal refundFee;

    @Column(comment = "退款手续费比例", value = "refund_fee_rate")
    private BigDecimal refundFeeRate;

    @Column(comment = "撤销手续费", value = "reversal_fee")
    private BigDecimal reversalFee;

    @Column(comment = "撤销手续费比例", value = "reversal_fee_rate")
    private BigDecimal reversalFeeRate;

    @Column(comment = "跨境手续费", value = "cross_border_fee")
    private BigDecimal crossBorderFee;

    @Column(comment = "跨境手续费比例", value = "cross_border_fee_rate")
    private BigDecimal crossBorderFeeRate;


    public UserCardWallet() {
    }

    public UserCardWallet(Long userId,
                          Long cardId,
                          BigDecimal amount,
                          BigDecimal exchangeRate,
                          Integer verifyOpenCardStatus,
                          Integer verifyRechargeCardStatus,
                          Integer verifyOutCardStatus,
                          Integer verifyCloseCardStatus,
                          Integer verifyFreezeUnFreezeCardStatus,
                          Integer openCardOnLineCount,
                          CardType card
    ) {
        this.userId = userId;
        this.cardId = cardId;
        this.amount = amount;
        this.exchangeRate = exchangeRate;
        this.verifyOpenCardStatus = verifyOpenCardStatus;
        this.verifyRechargeCardStatus = verifyRechargeCardStatus;
        this.verifyOutCardStatus = verifyOutCardStatus;
        this.verifyCloseCardStatus = verifyCloseCardStatus;
        this.verifyFreezeUnFreezeCardStatus = verifyFreezeUnFreezeCardStatus;
        this.openCardOnLineCount = openCardOnLineCount;
        this.authFee = card.getAuthFee();
        this.authFeeRate = card.getAuthFeeRate();
        this.minAuthFee = card.getMinAuthFee();
        this.minAuthFeeRate = card.getMinAuthFeeRate();
        this.failFee = card.getFailFee();
        this.failFeeRate = card.getFailFeeRate();
        this.refundFee = card.getRefundFee();
        this.refundFeeRate = card.getRefundFeeRate();
        this.reversalFee = card.getReversalFee();
        this.reversalFeeRate = card.getReversalFeeRate();
        this.crossBorderFee = card.getCrossBorderFee();
        this.crossBorderFeeRate = card.getCrossBorderFeeRate();
    }

}
